<?php
namespace Home\Controller;
use Think\Controller;

class AppController extends Controller {

    public function index(){

        $Model = M('App');

        $app  = $Model->order('rank desc')->select();

        $appReturn = array();
        foreach($app as $v){

            $appReturn[] = array(
                'name'          => $v['name'],
                'logoUrl'       => C('PICDOMAIN').C('PICPATH').$v['litpic'],
                'downUrl'       =>  $v['url'],
                'description'   => $v['description']
            );
        }

        $this->ajaxReturn($appReturn);
    }
}